package com.fjec.common.protocol;

public class ProtoDemo {

    public static void main(String[] args) {
        FjecFruitsProto.FjecFruitsMsg.Builder msgBuilder = FjecFruitsProto.FjecFruitsMsg.newBuilder();
        msgBuilder.setType(FjecFruitsProto.FjecFruitsMsg.MsgType.SysMsg);
        msgBuilder.setDataId(200000L);
        FjecFruitsProto.SysMsg.Builder sysMsgBuilder = FjecFruitsProto.SysMsg.newBuilder();
        sysMsgBuilder.setMsgId(100000L);
        sysMsgBuilder.setMsgType(1);
        FjecFruitsProto.FjecFruitsMsg msg = msgBuilder.setSysMsg(sysMsgBuilder.build()).build();
        System.out.println(msg.getTypeValue() + " || " + msg.getDataId());
    }
}
